Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axios api #87

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Axios api #87

merged 2 commits into from
Nov 12, 2024

Conversation

palagdan
Copy link
Collaborator

Resolve #86

@palagdan
Copy link
Collaborator Author

palagdan commented Nov 12, 2024

@blcham

Regarding your comment about the JSON-LD-based API, I don't think there are any issues with the migration to Axios.

The goal of this ticket was to remove things like (res) => res.json() and result => return result;, and to create a single API instance that can be configurable.

For example, this:

return fetch("/rest/execution/history-modules", postRequestOptions)
      .then((res) => res.json())
      .then((result) => {
        return result;
      });

Now it is just:

  return postFetcher(URLs.EXECUTION_HISTORY_MODULES, data);

I tested the application and it works as before.

@palagdan palagdan requested a review from blcham November 12, 2024 12:51
@blcham blcham merged commit 2ab6b31 into master Nov 12, 2024
2 checks passed
@blcham blcham deleted the 86-axios-api branch November 12, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use axios library for API requests
2 participants